// 枚举类型
type iconType =
  | "none"
  | "success"
  | "loading"
  | "error"
  | "fail"
  | "exception"
  | undefined;

export const msg = (
  title: string,
  duration: number = 2500,
  mask: boolean = false,
  icon: iconType = "none"
) => {
  //统一提示方便全局修改
  if (Boolean(title) === false) {
    return;
  }
  uni.showToast({
    title,
    duration,
    mask,
    icon,
  });
};
